home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / a_utils / perl / msds-prl / ptchds19.zoo / ms-dos_h < prev    next >
Text File  |  1992-02-23  |  4KB  |  118 lines

  1. MS-DOS patches to perl.
  2. Apply this patch to the standard perl source, version 4, patch level 19,
  3. using "patch -p."  Do this in the root directory of the perl source
  4. distribution.
  5.  
  6. You can cat all these patches together and pipe the output to patch -p.
  7.  
  8. Len Reed
  9. Holos Software, Inc.
  10. ..!gatech!holos0!lbr
  11. holos0!lbr@gatech.edu
  12. --------------------------------------
  13. *** msdos/ms-dos.h.old    Sun Feb 23 08:48:16 1992
  14. --- msdos/ms-dos.h    Thu Nov 14 08:56:36 1991
  15. ***************
  16. *** 0 ****
  17. --- 1,100 ----
  18. + /* $Header: c:/usr/lbr/perl/RCS/ms-dos.h 1.1 90/10/15 15:18:53 lbr Exp $
  19. +  *
  20. +  *    (C) Copyright 1988, 1990 Diomidis Spinellis.
  21. +  *    (C) Copyright 1990 Leonard Reed.
  22. +  *
  23. +  *    You may distribute under the terms of the GNU General Public License
  24. +  *    as specified in the README file that comes with the perl 3.0 kit.
  25. +  *
  26. +  * $Log:    ms-dos.h $
  27. +  * Revision 1.1  90/10/15  15:18:53  lbr
  28. +  * Initial revision
  29. +  * 
  30. +  */
  31. + #ifndef MK_FP
  32. +     /* Macro to make a far pointer from segment, offset */
  33. + # define MK_FP(seg,ofs) \
  34. +     ((void far *) (((unsigned long)(seg) << 16) | (unsigned)(ofs)))
  35. + #endif
  36. + enum action {
  37. +     han_delete,     /* delete the (handle) file */
  38. +     fdelete,         /* delete the (stream) file */
  39. +     execute,        /* execute the command, file open as (FILE *) */
  40. +     swap_file        /* swap file (handle open) */
  41. + };
  42. + typedef union {    /* handle or stream pointer */
  43. +     FILE *f;
  44. +     int h;
  45. + } HFD;
  46. + struct todo {
  47. +     HFD hfd;            /* handle or stream pointer */
  48. +     char *name;            /* Name of the file (to unlink) */
  49. +     const char *command;    /* Command to execute */
  50. +     enum action what;        /* What to do */
  51. +     int child_status;        /* "wait" value of child: used only
  52. +                        for pipes read by parent
  53. +                 */
  54. +     struct todo *next;        /* Next structure */
  55. + };
  56. + struct todo *add_temp_file(FILE *, int, char *, char *, enum action , int);
  57. + void block_signals(void);
  58. + void unblock_signals(void);
  59. + void msdos_sig_death(int);
  60. + int swap_spawn(int, char *, char **);
  61. + int exec( int, char far *, char far *, int, int);
  62. + void cleanup_msdos_temps(void);
  63. + /* Structure of MS-DOS system file table entry.  Sure is silly that we
  64. +    have to play with this.  The pack pragma is because the words in
  65. +    this table are not even word aligned!  (The guys who "designed"
  66. +    this stuff never looked beyond the 8088.)
  67. +    Refer to Waite Group's MS-DOS Developer Guide, 2nd. edition, pp. 212-213,
  68. +    for infor about this structure.
  69. + */
  70. + #pragma pack(1)
  71. + struct sft {
  72. +     unsigned int ref_count;    /* number of references */
  73. +     unsigned int open_mode;
  74. +     unsigned char dattrib;
  75. +     unsigned int flags;        /* flags including DOS_SFT_NOINHERIT */
  76. +     unsigned long dbb;
  77. +     unsigned int init_cluster;
  78. +     unsigned int time;
  79. +     unsigned int date;
  80. +     unsigned long file_size;
  81. +     unsigned long file_offset;
  82. +     unsigned int relative_cluster;
  83. +     unsigned int current_cluster;
  84. +     unsigned int block_number;
  85. +     unsigned char dir_index;
  86. +     char file_name[8];
  87. +     char file_ext[3];
  88. +     char unknown[4];
  89. +     unsigned int mach_owner;
  90. +     unsigned int psp_owner;
  91. +     unsigned int status;
  92. +     char only_in_40[6];        /* unknown, only found in DOS 4.0+ */
  93. + };
  94. + #pragma pack()
  95. +     /* Convert handle to MS-DOS system file table entry pointer */
  96. + struct sft far * dos_sys_file(int);
  97. + #define DOS_SFT_NOINHERIT 0x1000    /* flags mask for noinherit by child */
  98. + int dos_get_nofiles(void);
  99. + unsigned char far * dos_get_sft_map(void);
  100. +     /* Call dos directly, bypassing the C library "intelligence." */
  101. + int dos_close(int);
  102. + int dos_dup(int);
  103. + int dos_dup2(int, int);
  104. + #define KSH_META_CHARS "*\"?<>|()&][$#`'\\"    /* Korn shell metachars */
  105.